home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 22 / CU Amiga Magazine's Super CD-ROM 22 (1998)(EMAP Images)(GB)[!][issue 1998-05].iso / PowerPC / Programming / PPCSmallEiffel / bin_c / compile_to_c18.c < prev    next >
Encoding:
C/C++ Source or Header  |  1998-01-16  |  4.6 KB  |  151 lines

  1. /*
  2. -- ANSI C code generated by :
  3. -- SmallEiffel The GNU Eiffel Compiler -- Release (- 0.82)      --
  4. -- Copyright (C), 1994-98 - LORIA - UHP - CRIN - INRIA - FRANCE --
  5. -- Dominique COLNET and Suzanne COLLIN -    colnet@loria.fr     --
  6. --                 http://www.loria.fr/SmallEiffel              --
  7. */
  8. #include "compile_to_c.h"
  9. void r798c_dicho(int C,T0* a1,int a2,int a3){
  10. T0* _dyn_rf=NULL;
  11. T0* _dyn_rc=NULL;
  12. int _m=0;
  13. /*IF*/if ((a2)==(a3)) {
  14. _dyn_rc=r396item(((T396*)(oBC798running)),a2);
  15. _dyn_rf=r355dynamic(((T355*)_dyn_rc),a1);
  16. r798tail_opening(/*X496*/((T0*)(((T832*)((T832*)a1)))->_result_type/*24*/),/*X496*/((T0*)(((T832*)((T832*)_dyn_rf)))->_result_type/*24*/));
  17. r324push_switch(((T324*)(oBC364cpp)),_dyn_rf,a1);
  18. X496mapping_c(_dyn_rf);
  19. r324pop(((T324*)(oBC364cpp)));
  20. r798tail_closing(/*X496*/((T0*)(((T832*)((T832*)a1)))->_result_type/*24*/),/*X496*/((T0*)(((T832*)((T832*)_dyn_rf)))->_result_type/*24*/));
  21. }
  22. else {
  23. _m=((a2)+(a3))/(2);
  24. _dyn_rc=r396item(((T396*)(oBC798running)),_m);
  25. /*[IRF3.5put_string*/r544put_string(((T544*)((((T324*)((T324*)(oBC364cpp))))->_current_out/*56*/)),((T0*)ms8_798));
  26. /*]*/
  27. /*[IRF3.5put_integer*/r544put_integer(((T544*)((((T324*)((T324*)(oBC364cpp))))->_current_out/*56*/)),(((T355*)((T355*)_dyn_rc)))->_id/*4*/);
  28. /*]*/
  29. /*[IRF3.5put_string*/r544put_string(((T544*)((((T324*)((T324*)(oBC364cpp))))->_current_out/*56*/)),((T0*)ms9_798));
  30. /*]*/
  31. r798c_dicho(C,a1,a2,_m);
  32. /*[IRF3.5put_string*/r544put_string(((T544*)((((T324*)((T324*)(oBC364cpp))))->_current_out/*56*/)),((T0*)ms10_798));
  33. /*]*/
  34. r798c_dicho(C,a1,(_m)+(1),a3);
  35. /*[IRF3.5put_character*//*[IRF3.6put_character*/{T544* C1=((T544*)((((T324*)((T324*)(oBC364cpp))))->_current_out/*56*/));
  36. char b1='\175';
  37. putc(b1,((FILE*)((((T544*)C1))->_output_stream/*4*/)));
  38. }/*]*/
  39. /*]*/
  40. }
  41. /*FI*/}
  42. void r798put_arguments(T0* a1,T0* a2){
  43. int _up=0;
  44. int _i=0;
  45. _i=1;
  46. _up=/*(IRF4.6count*/(((T65*)((T65*)((((T31*)((T31*)a2)))->_flat_list/*12*/))))->_upper/*12*//*)*/;
  47. while (!((_i)>(_up))) {
  48. /*IF*/if ((_i)>(1)) {
  49. /*[IRF3.5put_character*//*[IRF3.6put_character*/{T544* C1=((T544*)((((T324*)((T324*)(oBC364cpp))))->_current_out/*56*/));
  50. char b1='\54';
  51. putc(b1,((FILE*)((((T544*)C1))->_output_stream/*4*/)));
  52. }/*]*/
  53. /*]*/
  54. }
  55. /*FI*/r798put_ith_argument(a1,a2,_i);
  56. _i=(_i)+(1);
  57. }
  58. }
  59. /*No:SWITCH.fz_void*/
  60. /*No:ASSERTION.fz_is_not_boolean*/
  61. /*No:ASSERTION.fz_bad_assertion*/
  62. void r348make(T348* C,T0* a1,T0* a2,T0* a3){
  63. C->_tag=a1;
  64. C->_expression=a2;
  65. C->_comment=a3;
  66. }
  67. /*No:ASSERTION.expression*/
  68. T0* r348start_position(T348* C){
  69. T0* R=NULL;
  70. /*IF*/if (((((T348*)C))->_tag/*0*/)!=((void*)(NULL))) {
  71. R=(((T490*)((T490*)((((T348*)C))->_tag/*0*/))))->_start_position/*4*/;
  72. }
  73.  else if (((((T348*)C))->_expression/*4*/)!=((void*)(NULL))) {
  74. R=X662start_position((((T348*)C))->_expression/*4*/);
  75. }
  76. else {
  77. R=(((T393*)((T393*)((((T348*)C))->_comment/*8*/))))->_start_position/*0*/;
  78. }
  79. /*FI*/return R;
  80. }
  81. void r348compile_to_c(T348* C){
  82. /*IF*/if (((((T348*)C))->_expression/*4*/)!=((void*)(NULL))) {
  83. r324check_assertion(((T324*)(oBC364cpp)),(((T348*)C))->_expression/*4*/);
  84. }
  85. /*FI*/}
  86. /*No:ASSERTION.comment*/
  87. T0* r348to_runnable(T348* C,T0* a1){
  88. T0* R=NULL;
  89. T0* _e=NULL;
  90. /*IF*/if (((((T348*)C))->_current_type/*12*/)==((void*)(NULL))) {
  91. C->_current_type=a1;
  92. R=(T0*)C;
  93. /*IF*/if (((((T348*)C))->_expression/*4*/)!=((void*)(NULL))) {
  94. _e=X662to_runnable((((T348*)C))->_expression/*4*/,a1);
  95. /*IF*/if ((_e)==((void*)(NULL))) {
  96. r348error(r348start_position(C),((T0*)ms57_470));
  97. }
  98. else {
  99. C->_expression=_e;
  100. /*IF*/if (!(X291is_boolean(X662result_type((((T348*)C))->_expression/*4*/)))) {
  101. r683add_type(X662result_type((((T348*)C))->_expression/*4*/),((T0*)ms73_470));
  102. r348error(r348start_position(C),((T0*)ms57_470));
  103. }
  104. /*FI*/}
  105. /*FI*/}
  106. /*FI*/}
  107. else {
  108. {T348*n=malloc(sizeof(*n));
  109. *n=M348;
  110. r348make(n,(((T348*)C))->_tag/*0*/,(((T348*)C))->_expression/*4*/,(((T348*)C))->_comment/*8*/);
  111. R=(T0*)n;
  112. }
  113. R=r348to_runnable(((T348*)R),a1);
  114. }
  115. /*FI*/return R;
  116. }
  117. /*No:ASSERTION.tag*/
  118. /*No:ASSERTION.current_type*/
  119. void r348compile_to_c_old(T348* C){
  120. /*IF*/if (((((T348*)C))->_expression/*4*/)!=((void*)(NULL))) {
  121. X662compile_to_c_old((((T348*)C))->_expression/*4*/);
  122. }
  123. /*FI*/}
  124. int r348is_pre_computable(T348* C){
  125. int R=0;
  126. /*IF*/if (((((T348*)C))->_expression/*4*/)==((void*)(NULL))) {
  127. R=1;
  128. }
  129. else {
  130. R=X662is_pre_computable((((T348*)C))->_expression/*4*/);
  131. }
  132. /*FI*/return R;
  133. }
  134. int r348use_current(T348* C){
  135. int R=0;
  136. /*IF*/if (((((T348*)C))->_expression/*4*/)!=((void*)(NULL))) {
  137. R=X662use_current((((T348*)C))->_expression/*4*/);
  138. }
  139. /*FI*/return R;
  140. }
  141. void r348error(T0* a1,T0* a2){
  142. r683add_position(a1);
  143. r683error(((T683*)(oBC364eh)),a2);
  144. }
  145. void r348afd_check(T348* C){
  146. /*IF*/if (((((T348*)C))->_expression/*4*/)!=((void*)(NULL))) {
  147. X662afd_check((((T348*)C))->_expression/*4*/);
  148. }
  149. /*FI*/}
  150.  
  151.